package com.smart.community.parking.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 充电记录实体类
 * 
 * @author Wu.Liang
 * @since 2024-12-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sc_charging_record")
public class ChargingRecord {

    /**
     * 充电记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 充电记录号
     */
    @TableField("record_no")
    private String recordNo;

    /**
     * 充电桩ID
     */
    @TableField("charging_pile_id")
    private Long chargingPileId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 开始充电时间
     */
    @TableField("start_time")
    private LocalDateTime startTime;

    /**
     * 结束充电时间
     */
    @TableField("end_time")
    private LocalDateTime endTime;

    /**
     * 充电量(kWh)
     */
    @TableField("charge_amount")
    private BigDecimal chargeAmount;

    /**
     * 总费用
     */
    @TableField("total_fee")
    private BigDecimal totalFee;

    /**
     * 支付状态：0-未支付，1-已支付
     */
    @TableField("payment_status")
    private Integer paymentStatus;

    /**
     * 充电状态：1-充电中，2-已完成
     */
    @TableField("charging_status")
    private Integer chargingStatus;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 逻辑删除标识：0-未删除，1-已删除
     */
    @TableLogic
    @TableField("deleted")
    private Integer deleted;
} 